sentence = input('请输入一行字符：')
counts = {"文字": 0, "数字": 0, "空格": 0, "其他":0 }

for i in sentence:
    if i.isalpha():
        counts["文字"] += 1
    elif i.isnumeric():
        counts["数字"] += 1
    elif i.isspace():
        counts["空格"] += 1
    else:
        counts["其他"] += 1

for key, value in counts.items():
    print("{}: {}个".format(key, value))
